﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports;
using MySql.Data.MySqlClient;
using OpenGado.Win.Reports;

namespace OpenGado.Win
{
    public partial class frmReportContainer : Form
    {


        public frmReportContainer(ReportDocument myRep, DataSet dsReport)
        {
            InitializeComponent();
            LoadReport(myRep, dsReport);
        }

      

        private void LoadReport(ReportDocument myRep, DataSet dsReport)
        {
           
          
            try
            {
                
                if (myRep != null)
                {
                    myRep.SetDataSource(dsReport.Tables["report"]);

                    rptViewer.ReportSource = myRep;
                }
            }
            catch (Exception ex)
            {
                    
                throw;
            }
            
        }
    }
}
